$(document).ready(function(){
    $('a[data-my-tooltip=tooltip]').tooltip();
    $('span[data-my-tooltip=tooltip]').tooltip();
    
	$('.flexslider').flexslider({
		namespace: "big-",
		animation: "slide",
		directionNav: true,
		prevText: '<i class="icon-angle-left"></i>',
 		nextText: '<i class="icon-angle-right"></i>'
	});
	
    //bootstrap hack
    $('.dropdown-toggle').dropdownHover();
    $('.btn.dropdown-toggle').click(function(e){
        e.preventDefault();
    });
    
    //Hover Effect 
	$("#manufacturersIndex ul > li").hover(function() { // Mouse over
	  $(this).siblings().stop().fadeTo(300, 0.7);
	}, function() { // Mouse out
	  $(this).siblings().stop().fadeTo(300, 1);
	});
       
	//Colorbox
	$('.productImagesGallery').colorbox({
		rel:'group1',
		height: '90%'
	});
	
	//footer
	var speed=2000;
	var pause=5000;
    function addFirst(first){
        $(first).insertBefore('#scroller ul li:first').fadeIn(1000,function(){});
    }    
	function removeLast(){
		$('#scroller ul li:last').fadeOut(0,function(){});
        addFirst('#scroller ul li:last');
    }

    interval = setInterval(removeLast,pause);
    
});